﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Administrator/Admincp.Master" AutoEventWireup="true" CodeBehind="Quanlydiadiemtrunggian1tuyen.aspx.cs" Inherits="Moving03.Administrator.WebForm11" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    CHI TIẾT 
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <form id="form1" runat="server">
    <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong style="color: #6666FF">
     &nbsp; DANH SÁCH CÁC TUYẾN VỚI CÁC ĐỊA ĐIỂM TRUNG GIAN CỦA TỪNG TUYẾN</strong><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        CellPadding="4" DataKeyNames="Id_CPDDNNgoai" DataSourceID="SqlDataSource1" 
        ForeColor="#333333" GridLines="None" Width="60%" style="margin:auto; text-align:center">
        <AlternatingRowStyle BackColor="White" />
        <Columns>            
            <asp:TemplateField HeaderText="Chọn">
                <ItemTemplate>
                    <asp:HyperLink ID="HyperLink2" runat="server" Text="Xem" 
                        NavigateUrl='<%# "Quanlydiadiemtrunggian1tuyen.aspx?ID="+Eval("Id_CPDDNNgoai") %>'>Xem</asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>

               <asp:TemplateField HeaderText="Chọn">
                <ItemTemplate>
                    <asp:HyperLink ID="HyperLink3" runat="server" Text="Xem" 
                        NavigateUrl='<%# "CapNhatDiaDiemTrungGian.aspx?ID="+Eval("Id_CPDDNNgoai") %>'>Sửa</asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>


            <asp:TemplateField HeaderText="Quốc Gia Đi">
                <ItemTemplate>
                    <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource2" DataTextField="TenQuocGia" Enabled="false" DataValueField="Id_MaQGia"  AutoPostBack="false" SelectedValue='<%# Eval("Id_QuocGia1") %>'> 
                    </asp:DropDownList>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Quốc Gia Đến">
                <ItemTemplate>
                    <asp:DropDownList ID="DropDownList2" runat="server" DataSourceID="SqlDataSource2" DataTextField="TenQuocGia" Enabled="false" DataValueField="Id_MaQGia" AutoPostBack="false" SelectedValue='<%# Eval("Id_QuocGia2") %>'> 
                    </asp:DropDownList>
                </ItemTemplate>
           </asp:TemplateField>
           
            
        </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:UPSConnectionString %>" 
        SelectCommand="SELECT [Id_QuocGia1], [Id_QuocGia2], [Id_CPDDNNgoai] FROM [ChiPhiDiaDiemNuocNgoai]">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:UPSConnectionString %>" 
        SelectCommand="SELECT [TenQuocGia], [Id_MaQGia] FROM [DanhSachQuocGia]">
    </asp:SqlDataSource>
    <br />
    <br />
    <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
        DataSourceID="SqlDataSource3" CellPadding="4" ForeColor="#333333" 
        GridLines="None" Width="70%" style="margin:auto; text-align:center">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:BoundField DataField="Id_CPDDNNgoai" HeaderText="Id_CPDDNNgoai" 
                SortExpression="Id_CPDDNNgoai" InsertVisible="False" Visible="False" />
            <asp:BoundField DataField="Id_TG" HeaderText="Id_TG" SortExpression="Id_TG" 
                InsertVisible="False" Visible="False" />
             <asp:TemplateField HeaderText="Địa Điểm Trung Gian">
                <ItemTemplate>
                    <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource4" DataTextField="TenDiaDiem" DataValueField="Id_DDTrungGian" Enabled="false"  AutoPostBack="false" SelectedValue='<%# Eval("Id_TG") %>'> 
                    </asp:DropDownList>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
        ConnectionString="<%$ ConnectionStrings:UPSConnectionString %>" 
        
        SelectCommand="SELECT [Id_CPDDNNgoai], [Id_TG] FROM [DiaDiemTrungGian1Tuyen] WHERE ([Id_CPDDNNgoai] = @Id_CPDDNNgoai2) ORDER BY thutuvanchuyen">
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="1" Name="Id_CPDDNNgoai2" 
                QueryStringField="ID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource4" runat="server" 
        ConnectionString="<%$ ConnectionStrings:UPSConnectionString %>" 
        SelectCommand="SELECT [Id_DDTrungGian], [TenDiaDiem] FROM [DiaDiemTrungGian]">
    </asp:SqlDataSource>
    <br />
    <br />
    </form>

</asp:Content>
